function [ps_raw]=find_ps_during_running(velP_ind,velM_ind)

ps_raw=velP_ind&~velM_ind;
ps_raw(end)=0;
start_search=0;
end_search=0;
cnt=0;
ps_start_ind=[];
ps_end_ind=[];

for ind=1:length(ps_raw)
    if ps_raw(ind)==0 & start_search==0
        start_search=1;
    end
    if ps_raw(ind)==1 & start_search==1
        cnt=cnt+1;
        ps_start_ind(cnt)=ind;
        start_search=0;
        end_search=1;
    end
    if ps_raw(ind)==0 & end_search==1;
        ps_end_ind(cnt)=ind;
        end_search=0;
    end
end

for ind=1:length(ps_start_ind)
    if velP_ind(ps_start_ind(ind)-1)==0
        ps_raw(ps_start_ind(ind):ps_end_ind(ind))=0;
    end
end
        
    